package z.sample.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import z.sample.persistence.dao.CustomerDao;
import z.sample.persistence.dao.EmployeeDao;
import z.sample.persistence.dao.OfficeDao;
import z.sample.persistence.entity.Customer;
import z.sample.persistence.entity.Employee;
import z.sample.persistence.entity.Office;

@Service
public class DemoServiceImpl implements DemoService {
	@Autowired
	private CustomerDao customerDao;
	
	@Autowired
	private OfficeDao officeDao;
	
	@Autowired
	private EmployeeDao employeeDao;
	
	@Override
	public List<Customer> getAllCustomers() {
		return this.customerDao.findAll();
	}

	@Override
	public List<Employee> getAllEmployees() {
		return this.employeeDao.findAll();
	}

	@Override
	public List<Office> getAllOffices() {
		return this.officeDao.findAll();
	}

}
